-
Notifications
You must be signed in to change notification settings - Fork 57
Workload policy label #817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
eeaacc9 to
9ae1d4f
Compare
9ae1d4f to
d28e51e
Compare
FIoannides
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but please test this on a non-NAP cluster before merging
|
|
||
|
|
||
| def create_placement_policy_label(system: SystemCharacteristics) -> str: | ||
| if system.accelerator_type != AcceleratorType.TPU: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this guard? I'm surprised that placement_policy_label can be rendered as empty string if it's not supported, but also if accelerator is not TPU. If we need to add a label whenever placement policy is supported, then I'd expect create to return something whenever is_supported is true.
| nodeSelector: | ||
| {accelerator_label} | ||
| {machine_label} | ||
| {placement_policy_label} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's too bad we have no test coverage for this, no unit tests cover the actual yaml content, and goldens only capture that some change happened in the template.
Description
When cluster supports placement-policy, we additionally need to append
nodeSelector.labelto workloads scheduled on this cluster.Note: this adds a new label to workloads scheduled on non-nap clusters as well. Clarifying if this is okay.
Issue
b/455642310
Testing
Tested by scheduling an actual workload.